<?php
/**
  * Mar 11, 2008
  *
  * Coded by: Ropu
  *
  */

require_once 'classes/http.php';

abstract class Hi5 {
  protected $api_key;
  protected $uid;
  protected $Hi5AuthToken;
  
  protected $type="rest";
  
  public function __construct($api_key, $uid, $hi5AuthToken=null) {
    $this->api_key = $api_key;
    $this->uid = $uid;
    $this->Hi5AuthToken = $hi5AuthToken;
  }
  
  public function setType($type="rest") {
    switch(strtolower($type)) {
      case 'json':
        $this->type = 'json';
        break;
      case 'rest':
      default:
        $this->type = 'rest';
        break;
    }
  }
  
  public function setHi5AuthToken($hi5AuthToken) {
    $this->Hi5AuthToken = $hi5AuthToken;
  }
}

class AuthenticationRequiredException extends Exception {
  
}

class PermissionDeniedException extends Exception {
  
}
class InvalidIdException extends Exception {
  
}
